package com.wjc.file.controller.admin;




import com.wjc.file.FileApplication;
import com.wjc.server.dto.CommonDto;
import com.wjc.server.dto.PageDto;
import com.wjc.server.service.FileService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;


@RestController
@RequestMapping("/admin/file")
public class FileController {

    private static final Logger LOG= LoggerFactory.getLogger(FileApplication.class);
    public static final String BUSINESS_NAME = "文件";

    @Resource
    private FileService fileService;

    //查询
    @GetMapping("/list")
    public CommonDto list(@Valid  PageDto pageDto){
         fileService.list(pageDto);
//         LOG.info("分页有啥: {}",pageDto);
        CommonDto<PageDto> pageDtoCommonDto = new CommonDto<>();
        pageDtoCommonDto.setContent(pageDto);
        return pageDtoCommonDto;
    }


}
